using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Application.Hr;
using FytSoa.Application.Sys;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp-bom工序表
/// </summary>
public class ErpBomJobDto : AppEntity
{
    /// <summary>
    /// 编号
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Number { get; set; }

    /// <summary>
    /// 工序名称
    /// </summary>
    [Required]
    [StringLength(20)]
    public string Name { get; set; }

    /// <summary>
    /// 工作中心(车间)
    /// </summary>
    [Required]
    public long WorkCenterId { get; set; }
    
    /// <summary>
    /// 工作中心(车间)
    /// </summary>
    public SysCodeSimpleDto WorkCenter { get; set; }

    /// <summary>
    /// 负责人
    /// </summary>
    [Required]
    public long ChargePersonId { get; set; }
    
    /// <summary>
    /// 负责人
    /// </summary>
    public HrEmployeeSimpleDto Employee { get; set; }

    /// <summary>
    /// 成本
    /// </summary>
    [Required]
    public decimal JobPrice { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public bool Status { get; set; } = true;

    /// <summary>
    /// 备注说明
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}